package com.sikaryofficial.common.core.constant;

import cn.hutool.core.text.CharSequenceUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * @author : qinjinyuan
 * @desc : TODO  请填写你的功能描述
 * @date : 2023/11/04 10:08
 */
@Getter
@AllArgsConstructor
public enum EvaluateTypeEnum {

    /**
     * 自助评价
     */
    MANUAL(PointRuleConstant.EVALUATE, "自助评价"),
    /**
     * 扫描评价
     */
    SCAN_CODE(PointRuleConstant.SCAN_CODE, "扫描评价"),
   ;

    private final String evaluateType;
    private final String name;

    public static EvaluateTypeEnum getNameByCode(String evaluateType) {
        return Arrays.stream(EvaluateTypeEnum.values())
                .filter(pointRuleEnum -> CharSequenceUtil.equals(pointRuleEnum.getEvaluateType(),evaluateType))
                .findFirst().orElse(null);
    }
}
